# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=php7-pecl-lzf
_pkgreal=LZF
_pkgextname=lzf
pkgver=1.7.0
pkgrel=0
pkgdesc="PHP extension handles LZF de/compression - PECL"
url="https://pecl.php.net/package/LZF"
arch="all"
license="PHP-3.01"
depends="php7-common"
makedepends="php7-dev autoconf re2c"
source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir"/$_pkgreal-$pkgver
provides="php7-lzf=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-lzf" # for backward compatibility

build() {
	phpize7
	./configure --prefix=/usr --with-php-config=php-config7
	make
}

check() {
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test
}

package() {
	make INSTALL_ROOT="$pkgdir"/ install
	install -d "$pkgdir"/etc/php7/conf.d
	echo "extension=$_pkgextname" > "$pkgdir"/etc/php7/conf.d/50_$_pkgreal.ini
}

sha512sums="
76a2bce7aa44f9aae40345f37c9294626d453879c7f98099ad6c31ae32abc638233934bf22ddd9bc0d4a6d285b25aa06dedc175ad5bb1544884a272e6b031ced  LZF-1.7.0.tgz
"
